package cn.wolfcode.luowowo.member.mapper;

import cn.wolfcode.luowowo.member.domain.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Long id);

    List<UserInfo> selectAll();

    int updateByPrimaryKey(UserInfo record);

    int selectCountByPhone(String phone);

    UserInfo selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    void updateBydata(UserInfo user);

    void updateHeadImgUrl(@Param("photo") String photo, @Param("id") Long id);

    void updatePassword(UserInfo user);

    void updatePhone(@Param("phone") String phone, @Param("uid") Long uid);

    int selectGoldnumById(Long id);

    UserInfo getScoreById(Long userId);

    void updateScore(@Param("userId") Long userId, @Param("price") Long price);

    void updateBuy(UserInfo userInfo);
}